package com.blackbox.showroom.weidget;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.ImageView;

import com.blackbox.showroom.util.MoveHelp;


public class MoveImageView extends ImageView {

    private MoveHelp moveView;

    public MoveImageView(Context context) {
        super(context);
        initUI();
    }

    public MoveImageView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initUI();
    }

    public MoveImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initUI();
    }

    /**
     * 初始化UI
     */
    private void initUI() {
        setClickable(true);
        moveView = new MoveHelp(getContext());
        setOnTouchListener(moveView);
    }

}
